<%@ page import="com.abtu.sms.pojo.Teacher" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>个人信息</title>
    <link rel="stylesheet" href="http://localhost:8080/studentmanagesystem/css/layui.css">
    <link rel="stylesheet" href="http://localhost:8080/studentmanagesystem/css/style.css">
    <script src="http://localhost:8080/studentmanagesystem/layui.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
</head>
<body class="layui-layout-body" style="background-color: #F2F2F2">
<jsp:include page="/teacher/tHeader.jsp"></jsp:include>
<jsp:include page="/teacher/teacherNav.jsp"></jsp:include>

<%
    Teacher teacher = (Teacher) request.getSession().getAttribute("teacher");
    if (null != teacher) {
        %>
        <div class="layui-layout layui-layout-admin">
            <div class="layui-body">
                <!-- 内容主体区域 -->
                <div style="padding: 15px;">
                    <span class="layui-breadcrumb">
                        <a href="">教师端</a>
                        <a href="">个人信息管理</a>
                        <a><cite>个人信息</cite></a>
                    </span>
                    <form class="layui-form" action="/" style="padding-top: 50px" method="post">
                        <div class="layui-form-item">
                            <label class="layui-form-label">工号</label>
                            <div class="layui-input-block">
                                <input type="text" readonly="readonly" name="teacher-id" value="<%=teacher.getTid()%>" required lay-verify="required" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">姓名</label>
                            <div class="layui-input-block">
                                <input type="text" name="teacher-name" readonly="readonly" id="teacher-name" value=" <%=teacher.getTname()%>" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">性别</label>
                                <div class="layui-input-block" readonly="readonly">
                                    <%
                                        if (teacher.getTsex() == "男") {
                                    %>
                                    <input type="radio" name="teacher-sex" checked value="男" title="男">
                                    <input type="radio" name="teacher-sex"  value="女" title="女">
                                    <%
                                    } else {
                                    %>
                                    <input type="radio" name="teacher-sex" value="男" title="男">
                                    <input type="radio" name="teacher-sex" checked  value="女" title="女">
                                    <%
                                        }
                                    %>

                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">文化程度</label>
                                <div class="layui-input-block">
                                    <input type="text" name="teacher-education" readonly="readonly" id="teacher-education" value="<%=teacher.getTeducation()%>" placeholder="" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">职称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="teacher-title" id="teacher-title" readonly="readonly" value="<%=teacher.getTtitle()%>" placeholder="" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    <%
    }
%>





<script type="text/javascript">
    $("#nav li:nth-child(5) dl dd:nth-child(1)").addClass("layui-this");
    $("#nav li:nth-child(5)").addClass("layui-nav-itemed");
</script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
        element.init();
    });
</script>

<script>
    //Demo
    layui.use('form', function(){

    });
</script>
<script>


    // 获取性别
    console.log('得到的性别是:', result_gender)
    }

    <%--var sex = "${teacher.tsex}";--%>
    <%--if (sex == '男') {--%>
    <%--    $("#idsex").attr("checked","checked");--%>
    <%--    $("#idsex2").removeAttr("checked");--%>
    <%--} else if (sex == '女') {--%>
    <%--    $("#idsex2").attr("checked","checked");--%>
    <%--    $("#idsex").removeAttr("checked");--%>
    <%--}else{--%>
    <%--    $("#idsex").removeAttr("checked");--%>
    <%--    $("#idsex2").removeAttr("checked");--%>
    <%--}--%>
</script>

</body>
</html>

